package effective.enumannotaion;

public enum ExtendedOperation implements Operation {

	PLUS("^") {

		@Override
		public double apply(double x, double y) {
			return Math.pow(x, y);
		}

	},
	MINUS("%") {

		@Override
		public double apply(double x, double y) {
			return x % y;
		}

	};

	private final String symbol;

	private ExtendedOperation(String symbol) {
		this.symbol = symbol;
	}

	@Override
	public String toString() {
		return symbol;
	}

}
